CREATE TABLE [dbo].[tb_Pasos]
(
[idPaso] [int] NOT NULL IDENTITY(1, 1),
[Tarea] [int] NOT NULL,
[NroOrdenEnTarea] [int] NOT NULL,
[Descripcion] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Automatico] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[StoreProcedure] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IncluyeDocumentos] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Formulario] [int] NULL,
[TipoDePaso] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Pasos] ADD CONSTRAINT [PK_tb_Pasos] PRIMARY KEY NONCLUSTERED  ([idPaso]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Pasos] WITH NOCHECK ADD CONSTRAINT [FK_tb_Pasos_tb_Formularios] FOREIGN KEY ([Formulario]) REFERENCES [dbo].[tb_Formularios] ([idFormulario])
GO
ALTER TABLE [dbo].[tb_Pasos] WITH NOCHECK ADD CONSTRAINT [FK_tb_Pasos_tb_Tareas] FOREIGN KEY ([Tarea]) REFERENCES [dbo].[tb_Tareas] ([idTarea])
GO
ALTER TABLE [dbo].[tb_Pasos] WITH NOCHECK ADD CONSTRAINT [FK_tb_Pasos_tb_TiposDePasos] FOREIGN KEY ([TipoDePaso]) REFERENCES [dbo].[tb_TiposDePasos] ([IDTiposDePasos])
GO
